<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1"><title id="df20941">DROP TYPE</title><body><p id="sql_command_desc">Removes a data type.</p><section id="section2"><title>Synopsis</title><codeblock id="sql_command_synopsis">DROP TYPE [IF EXISTS] <varname>name</varname> [, ...] [CASCADE | RESTRICT]</codeblock></section><section id="section3"><title>Description</title><p><codeph>DROP TYPE</codeph> will remove a user-defined data type. Only
the owner of a type can remove it.</p></section><section id="section4"><title>Parameters</title><parml><plentry><pt>IF EXISTS</pt><pd>Do not throw an error if the type does not exist. A notice is issued
in this case.</pd></plentry><plentry><pt><varname>name</varname></pt><pd>The name (optionally schema-qualified) of the data type to remove.</pd></plentry><plentry><pt>CASCADE</pt><pd>Automatically drop objects that depend on the type (such as table
columns, functions, operators).</pd></plentry><plentry><pt>RESTRICT</pt><pd>Refuse to drop the type if any objects depend on it. This is the
default.</pd></plentry></parml></section><section id="section5"><title>Examples</title><p>Remove the data type <codeph>box</codeph>;</p><codeblock>DROP TYPE box;</codeblock></section><section id="section6"><title>Compatibility</title><p>This command is similar to the corresponding command in the SQL standard, apart from the
          <codeph>IF EXISTS</codeph> option, which is a Greenplum Database extension. But note that
        much of the <codeph>CREATE TYPE</codeph> command and the data type extension mechanisms in
        Greenplum Database differ from the SQL standard.</p></section><section id="section7"><title>See Also</title><p><codeph><xref href="ALTER_TYPE.xml#topic1" type="topic" format="dita"/></codeph>, <codeph><xref
            href="CREATE_TYPE.xml#topic1" type="topic" format="dita"/></codeph></p></section></body></topic>
